package com;

import com.domain.User;
import com.mapper.UserMapper1;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class UserTests2 {
    @Autowired
    private UserMapper1 userMapper1;
    @Test
    public void selectUser1(){
        User user = userMapper1.selectUser(2);
        System.out.println(user);
    }

    @Test
    public void updateUser(){
        User user = userMapper1.selectUser(2);
        user.setUserName("李四");
        user.setPwd("654321");
        int i = userMapper1.updateUser(user);
        System.out.println(user);
    }
}